local opt = {
  termguicolors = true,
  magic = false,
  shelltemp = true,
  wrap = false,
  updatetime = 100,
}

for k, v in pairs(opt) do
  vim.opt[k] = v
end

local o = {
  termguicolors = true,
  wildmenu = true,
  whichwrap = 'b,s,<,>,[,],h,l',
  hidden = true,
  backup = false,
  writebackup = false,
  swapfile = false,
  updatetime = 100,
  splitbelow = true,
  splitright = true,
  background = "dark",
  wrap = false,
  smartindent = true,
  ignorecase = true,
  smartcase = true,
  hlsearch = false,
  showmode = false,
  autoread = true,
  autoindent = true,
  expandtab = true,
  softtabstop = 2,
  shiftround = true,
  shiftwidth = 2,
  tabstop = 2,
  fileencoding = 'utf-8',
}

for k, v in pairs(o) do
  vim.o[k] = v
end

local wo = {
  number = true,
  relativenumber = true,
  cursorline = true,
  signcolumn = "yes",
  wrap = false,
}

for k, v in pairs(wo) do
  vim.wo[k] = v
end

local bo = {
  tabstop = 2,
  shiftwidth = 2,
  expandtab = true,
  autoindent = true,
  autoread = true,
}

for k, v in pairs(bo) do
  vim.bo[k] = v
end

-- others
vim.g.encoding = "UTF-8"
vim.opt.clipboard:append("unnamedplus")
